export type SearchType = {
	name: string
	pageSize: number
	pageNum: number
}

export type TableType = {
	name: string
	image: string
	category: string
	price: number
	status: number
	updateTime: string
	url?: string
	id?: string
	flavors?: IFlavorList[]
}

type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>

export type FormType = Optional<TableType, 'updateTime'>

export type DialogType = {
	dialogVisible: boolean
	title: string
	id?: string
}

export interface ICategoryList {
	createTime: string
	createUser: string
	id: string
	name: string
	sort: number
	type: number
	updateTime: string
	updateUser: string
}

export interface IFlavorList {
	name: string
	value: Array<string>
}

export interface IFormType {
	name: string
	image: string
	categoryId: string
	price: number | null
	status: number | null
	flavors: IFlavorList[]
	description: string
	id?:string
}